import javafx.application.Application;
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.StackPane;
import javafx.scene.control.Label;
import javafx.geometry.Insets;

public class Test extends Application {
	public void start(Stage stage) {
		StackPane paneTop=createStackPane("Top Pane");
		StackPane paneBottom=createStackPane("Bottom Pane");
		StackPane paneLeft=createStackPane("Left Pane");
		StackPane paneRight=createStackPane("Right Pane");
		StackPane paneCenter=createStackPane("Center");

		BorderPane pane=new BorderPane();
		pane.setTop(paneTop);
		pane.setBottom(paneBottom);
		pane.setLeft(paneLeft);
		pane.setRight(paneRight);
		pane.setCenter(paneCenter);

		Scene scene=new Scene(pane,500,300);

		stage.setScene(scene);
		stage.setTitle("border pane test");
		stage.show();
	}

	static StackPane createStackPane(String label) {
		StackPane pane=new StackPane();
		pane.getChildren().add(new Label(label));
		pane.setPadding(new Insets(20));
		pane.setStyle("-fx-border-color:yellowgreen");
		return pane;
	}
}
